
(define (smallest-divisor n)
        (find-divisor n 2)
)
(define (find-divisor n test-divisor)
        (cond ((> (* test-divisor test-divisor) n) n)
            ((dividers? test-divisor n) test-divisor)
            (else (find-divisor n (+ test-divisor 1)))
        )
)
(define (dividers? a b)
        (= (remainder b a) 0)
)

    (display (smallest-divisor 199))
    (newline)
    (display (smallest-divisor 1999))
    (newline)
    (display (smallest-divisor 19999))
    (exit)
